<? 
	require("required/dbconnect.php");
	require("required/share_function.php");
	require("required/header.php");
	require("required/chkuser.php");
	$id=$_GET['id'];
	
	$chk=mysql_query("select count(*)as result from os_favorite where pid=$id and uid=$member_id")or die(mysql_error());
	
	$get_pro=mysql_query("select product_name_chn from os_products where id=$id");
 ?>
		
				<table width="100%">
					<td class="page_title_bar">
						My Wish List
					</td>
						<tr align="center">
							<td height="400" valign="top"> 
						<?
							if(mysql_result($chk,0,"result")>0)
							{
						?>
						
							<font class="page_description">This product is already part of your wish list.</font>
							<br><br><input type="button" class="button" value="Back" onClick="window.open('os_view_full.php?id=<?= $id ?>','_self')">
						
						<? 
							}
							else
							{
								$insert=mysql_query("insert into os_favorite (uid,pid,add_datetime)values($member_id,$id,now())");
								
						?>
						<font class="page_description">This product has been added into your wish list!</font>	
						<br><br><input type="button" class="button" value="Back" onClick="window.open('os_view_full.php?id=<?= $id ?>','_self')">
						<? 
							} 
						?>
						</td>
						</tr>
						
				</table>
		
<? require("required/footer.php") ?>		